import {
	createRouter,
	createWebHistory
} from 'vue-router'
// import HomeView from '../views/HomeView.vue'
import Home from '../views/Home/Home.vue'

const routes = [{
		path: '/home',
		name: 'home',
		component: Home,
		children: [{
				path: '/doplan',
				name: 'doplan',
				component: () => import( /* webpackChunkName: "login" */ '../components/Plan/DoPlan.vue'),
			},
			{
				path: '/plans',
				name: 'plans',
				component: () => import( /* webpackChunkName: "login" */ '../components/Plan/Plans.vue'),
			},
			{
				path: '/user',
				name: 'user',
				component: () => import( /* webpackChunkName: "login" */ '../components/User/User.vue'),
			},
			{
				path: '/archieve',
				name: 'archieve',
				component: () => import( /* webpackChunkName: "login" */ '../components/Personnel/Archives.vue'),
			},
			{
				path: '/organization',
				name: 'organization',
				component: () => import( /* webpackChunkName: "login" */ '../components/Personnel/Organization.vue'),
			},
			{
				path: '/contract',
				name: 'contract',
				component: () => import( /* webpackChunkName: "login" */ '../components/Personnel/Contract.vue'),
			},
			{
				path: '/salary',
				name: 'salary',
				component: () => import( /* webpackChunkName: "login" */ '../components/Personnel/Salary.vue'),
			},
			{
				path: '/socialsec',
				name: 'socialsec',
				component: () => import( /* webpackChunkName: "login" */ '../components/Personnel/SocialSec.vue'),
			},
			{
				path: '/performance',
				name: 'performance',
				component: () => import( /* webpackChunkName: "login" */ '../components/Personnel/Performance.vue'),
			},
			{
				path: '/attendance',
				name: 'attendance',
				component: () => import( /* webpackChunkName: "login" */ '../components/Personnel/Attendance.vue'),
			},
			{
				path: '/recruit',
				name: 'recruit',
				component: () => import( /* webpackChunkName: "login" */ '../components/Personnel/Recruit.vue'),
			},
			{
				path: '/custadmin',
				name: 'custadmin',
				component: () => import( /* webpackChunkName: "login" */ '../components/Customer/Custadmin.vue'),
			},
			{
				path: '/hm',
				name: 'hm',
				component: () => import( /* webpackChunkName: "login" */ '../components/Message/HM.vue'),
			},

			{
				path: '/xie',
				name: 'xie',
				component: () => import('../components/Email/xie/Xie.vue')
			},
			{
				path: '/shou',
				name: 'shou',
				component: () => import('../components/Email/shou/Shou.vue')
			},
			{
				path: '/caogao',
				name: 'caogao',
				component: () => import('../components/Email/caogao/Caogao.vue')
			},

			{
				path: '/fasong',
				name: 'fasong',
				component: () => import('../components/Email/fasong/Fasong.vue')
			},
			{
				path: '/dele',
				name: 'dele',
				component: () => import('../components/Email/dele/Dele.vue')
			},
			{
				path: '/dian',
				name: 'dian',
				component: () => import('../components/Email/dian/Dian.vue')
			}


		]
	},
	// {
	//   path: '/about',
	//   name: 'about',
	//   // route level code-splitting
	//   // this generates a separate chunk (about.[hash].js) for this route
	//   // which is lazy-loaded when the route is visited.
	//   component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
	// },
	{
		path: '/login',
		name: 'Login',
		component: () => import( /* webpackChunkName: "login" */ '../views/Login/Login.vue'),
	},
	{
		path: '/register',
		name: 'register',
		component: () => import( /* webpackChunkName: "login" */ '../views/Login/Register.vue'),
	},

]

const isLogin = true;

const router = createRouter({
	history: createWebHistory(process.env.BASE_URL),
	routes
})


export default router
